Known Issues
============
+If you create a domain with a small amount of memory, under 32MBs, you
+may run into out of memory situations for the domain. There's no way
+to know the amount of memory needed by the kernel and modules used. Xm-test
+uses 64MBs as default and that should work. If there are out of memory
+issues, the default can be changed. Edit xm-test/lib/XmTestLib/XenDomain.py
+and change ParavirtDefaults and HVMDefaults "memory".
+
+There are two tests that work with small memory, 15_create_smallmem_pos.py
+and 16_create_smallmem_neg.py. The first makes sure the default 32 MBs
+limit works. The second checks a low memory fail situation. These tests
+are located in the xm-test/tests/create directory and can be easily edited
+to change the MEM value they should test. If the 32MBs test fails, the
+failure should be reported to the Xen xen-devel mailing list. The Xen
+tools use 32MBs as a lower acceptable limit for domain creation. The Xen
+mailing lists are located here:
+
+http://lists.xensource.com/
+
Reporting Bugs
==============
class XmConsole:
- def __init__(self, domain, historyLimit=256, historySaveAll=True, historySaveCmds=False):
+ def __init__(self, domain, historyLimit=256, historySaveAll=True, historySaveCmds=False, cLimit=131072):
"""
Parameters:
historyLimit: specifies how many lines of history are maintained
self.historySaveAll = historySaveAll
self.historySaveCmds = historySaveCmds
self.debugMe = False
- self.limit = None
+ self.limit = cLimit
consoleCmd = ["/usr/sbin/xm", "xm", "console", domain]
from XmTestLib import *
-MEM = 16
+# 32MBs is the default lower limit for creating domains, it should work
+MEM = 32
domain = XmTestDomain(extraConfig={"memory": MEM,
"extra" :"mem=%iM" % MEM})
try:
console = XmConsole(domain.getName())
- console.setLimit(65536)
console.sendInput("input")
console.runCmd("ls")
except ConsoleError, e:
--- /dev/null
+#!/usr/bin/python
+
+# Copyright (C) International Business Machines Corp., 2005
+# Author: Dan Smith <danms@us.ibm.com>
+
+from XmTestLib import *
+
+# This is under the default lower limit of 32 and we expect this test
+# to fail. 16MBs isn't enough for the -xen kernel.
+MEM = 16
+
+domain = XmTestDomain(extraConfig={"memory": MEM,
+ "extra" :"mem=%iM" % MEM})
+
+try:
+ domain.start()
+except DomainError, e:
+ FAIL("Unable to start a domain with %i MB" % MEM)
+
+try:
+ console = XmConsole(domain.getName())
+ console.sendInput("input")
+ console.runCmd("ls")
+except ConsoleError, e:
+ if e.reason == RUNAWAY:
+ print "Domain with %i MB has runaway console as expected" % MEM
+ else:
+ print "Starting a domain with %i MB failed as expected" % MEM
+else:
+ FAIL("Starting a console with %i MB passed, expected test to fail" % MEM)
+
+domain.destroy()
12_create_concurrent_stress_pos.test \
13_create_multinic_pos.test \
14_create_blockroot_pos.test \
- 15_create_smallmem_pos.test
+ 15_create_smallmem_pos.test \
+ 16_create_smallmem_neg.test
EXTRA_DIST = $(TESTS)